package cn.damai.mine.StringBufferAndBuilder;

public class StringBufferTest {
	
	private static StringBuffer param = new StringBuffer("");
	
	public static void main(String[] args) {
		
		Runnable run = new Runnable() {
			
			@Override
			public void run() {
					
				for (int i = 0; i < 1000; i++) {
					param.append("A");
				}
				System.out.println(Thread.currentThread().getName()+":"+param.length());
			}
		};
		
		for (int i = 0; i < 10; i++) {
			new Thread(run).start();
		}
		
	}
	
	/*private static synchronized void doWithParam(String t){
		param.append(t);
		System.out.println(Thread.currentThread().getName()+"*****:"+param);
	}*/

}
